﻿using System;
using Microsoft.Xna.Framework;

namespace Terraria.ModLoader.IO
{
	// Token: 0x020002D2 RID: 722
	public class Vector3TagSerializer : TagSerializer<Vector3, TagCompound>
	{
		// Token: 0x06001BFF RID: 7167 RVA: 0x00432BF0 File Offset: 0x00430DF0
		public override TagCompound Serialize(Vector3 value)
		{
			TagCompound tagCompound = new TagCompound();
			tagCompound["x"] = value.X;
			tagCompound["y"] = value.Y;
			tagCompound["z"] = value.Z;
			return tagCompound;
		}

		// Token: 0x06001C00 RID: 7168 RVA: 0x000140EF File Offset: 0x000122EF
		public override Vector3 Deserialize(TagCompound tag)
		{
			return new Vector3(tag.GetFloat("x"), tag.GetFloat("y"), tag.GetFloat("z"));
		}
	}
}
